<template>
  <div class="swiper">
    <van-swipe :autoplay="3000" :height="height" :show-indicators="false">
      <van-swipe-item v-for="(item, index) in banner" :key="index" class="banner-box">
        <template v-if="type == 'detail'">
        <img class="banner" :src="item" alt="banner">
        </template>
        <template v-else>
          <img class="banner" :src="item.litpic" alt="banner">
        </template>

      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>


export default {
  props: ["banner", "height", "type"],
  data() {
    return {
    };
  }
};
</script>

<style lang="less" scoped>
.banner-box {
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner {
  max-width: 100%;
  max-height: 100%;
}
</style>